package com.hua.base;
//如果是包级私有的类或者私有的嵌套类，那么直接暴露成员不会有特别大的影响。
public class AccessWithInnerClassDemo {
    private class InnerClass{
        int x;  //不用get、set
    }
    private InnerClass innerClass;
    public AccessWithInnerClassDemo(){
        innerClass = new InnerClass();
    }
    public int getValue(){
        return innerClass.x;
    }

    public static void main(String[] args) {
        AccessWithInnerClassDemo demo = new AccessWithInnerClassDemo();
        System.out.println(demo.getValue());

    }
}
